package com.xiaoyao.myframeapp.utils.RichScan;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.xiaoyao.myframeapp.R;
import com.xiaoyao.myframeapp.mvp.base.BaseActivityNo;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

//TODO 显示无法处理的二维码数据
public class SecondRestActivity extends BaseActivityNo {


    @BindView(R.id.out)
    ImageButton out;
    @BindView(R.id.title)
    TextView title;
    @BindView(R.id.add)
    TextView add;
    @BindView(R.id.web)
    WebView web;
    @BindView(R.id.activity_second_rest)
    LinearLayout activitySecondRest;
    private String data = "";

    @Override
    protected int getLayoutId() {
        return R.layout.activity_second_rest;
    }

    @Override
    protected void initView() {

        Intent intent = this.getIntent();
        Bundle bundle = intent.getExtras();
        data = bundle.getString("data");
        data = "<html> <span>" + data + " </span> </html>";

        web.loadData(data, "text/html", "utf-8");

    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void showLoading() {

    }

    @Override
    protected void hideLoading() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }

    @OnClick({R.id.out, R.id.add})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.out:
                finish();
                break;
            case R.id.add:
                break;
        }
    }
}
